﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PHMEE.MqttClient.MqttBusinessCommand
{
    /// <summary>
    /// 遗嘱
    /// </summary>
    public class DisconnectCommand : BaseCommand
    {
        private ISysParaRepository _sysParaRepository;

        public DisconnectCommand(ISysParaRepository sysParaRepository)
        {
            _sysParaRepository = sysParaRepository;
        }

        public override async Task ExecuteAsync(string requestInfo)
        {
            //数采器注册时标记为离线状态
            await _sysParaRepository.UpdataOnlineStatueAsync(SN, false);
        }
    }
}
